import rxAjax from '@/assets/js/ajax.js';

//Excel下载记录(异步) api接口
export const FormDownloadRecordApi = {};

FormDownloadRecordApi.baseUrl= '/api-form/form/core/formDownloadRecord';
FormDownloadRecordApi.exportUrl= FormDownloadRecordApi.baseUrl + '/listExport';

//查询列表
FormDownloadRecordApi.query=function (parameter) {
  var url= FormDownloadRecordApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
FormDownloadRecordApi.get =function(pkId) {
  var url= FormDownloadRecordApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
FormDownloadRecordApi.save =function(parameter) {
  var url= FormDownloadRecordApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
FormDownloadRecordApi.del =function(parameter) {
  var url= FormDownloadRecordApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

export  default FormDownloadRecordApi;

